/************************************************************************

								Heroes IV
					  Copyright 2002, The 3DO Company

	------------------------------------------------------------------
  						 timed_callback.h

	$Header: $

	$NoKeywords: $

 ************************************************************************/

#if !defined( TIMED_CALLBACK_H_INCLUDED )
#define TIMED_CALLBACK_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "idle_processor.h"
#include "handler.h"

// -----------------------------------------------------------------------
// An object which calls a handler after a fixed length of time
// -----------------------------------------------------------------------
class t_timed_callback : private t_idle_processor
{
	public:
		t_timed_callback();
		t_timed_callback( int delay, t_handler callback );

		void cancel();
		void set( int delay, t_handler callback );

	private:
		virtual void on_idle();

		t_handler m_callback;
};


#endif // TIMED_CALLBACK_H_INCLUDED
